SSRS Table headers - reporting-services

How to add textboxes from previous pages in SSRS ?
Ex:
Page1 : Textbox(page1)
Page2 : Textbox(page1) + Textbox(Page2)
Page3 : Textbox(page2) + Textbox(Page3)
Textbox is in table header.

Related

SSRS Hyperlink dual parameters errors

I am trying to pass a hyperlink in SSRS to open a new SSRS report (in pdf) from a text box. It is currently set up and works passing a single parameter :
="http://servername/ReportServer_REPORTS16/Pages/ReportViewer.aspx?%2fdummy%2fDocuments%2fCertificate+of+Insurance+Issued&rs:Command=Render&PolicyNo="
& Parameters!PolicyNo.Value &"&rs:Format=PDF"
However when I add in the second parameter :
="http://servername/ReportServer_REPORTS16/Pages/ReportViewer.aspx?%2fdummy%2fDocuments%2fCertificate+of+Insurance+Issued&rs:Command=Render&PolicyNo="
& Parameters!PolicyNo.Value &"&
Entitled="&Parameters!Entitled.Value &"&rs:Format=PDF"
I get an error message :
The ActionInfo.Action.Hyperlink expression for the text box
‘Textbox48’ contains an error: [BC30277] Type character '&' does not
match declared data type 'Object'.
I've gone through every similar error I've found on google but cant work out where im going wrong.
You need to convert all your values to strings then use the + operator....
Here'a an exmaple from one of my reports that does the same thing.
=IIF(Fields!PackSizeDesc.Value = Nothing, Nothing,
"http://MyServername/ReportServer?/Brand+Value/_sub+SKU+Price+Details"
+ "&CountryID=" + cStr(Fields!CountryID.Value)
+ "&CategoryID=" + cStr(Fields!CategoryID.Value)
+ "&RecordedPeriodID=" + cStr(Parameters!PeriodID.Value)
+ "&TMB=" + cStr(Fields!TrademarkBrandID.Value)
+ "&PriceStage=" + cStr(IIF(Fields!IsActualprice.Value = 1, 10, 11))
+ "&pm=" + cStr(Fields!PackMaterialID.Value)
+ "&pt=" + cStr(Fields!PackTypeID.Value)
+ "&ps=" + cStr(Fields!PackSizeID.Value)
+ "&psu=" + cStr(Fields!PackSizeUnitID.Value)
+ "&upp=" + cStr(Fields!UnitsPerPack.Value)
+ "&rc:Parameters=Collapsed")
Note: The first line just disables the link if there is now value in a particular column. This does not render to PDF but that's not part of your issue.

Can't click cell in HTML table

I'm writing a script to login to an internal html site, click around to the appropriate place, click on a specific row in an HTML table, and click a submit button. I'm pretty much there, except I can't figure out how to click the correct row - or any row for that matter.
Here is the source of the table: HTML Source
Here is what I've tried so far after navigating to the page with the table of interest (with no results, but no errors):
Set mainTable = IE.Document.getElementByID("main").contentwindow.document
mainTable.getElementsByName("acq_scenario.acq_scenario_summary").Item(0).getElementsByTagName("tr").Item(0).getElementsByTagName("td").Item(3).focus
mainTable.getElementsByName("acq_scenario.acq_scenario_summary").Item(0).getElementsByTagName("tr").Item(0).getElementsByTagName("td").Item(3).click
The code below tries to change the attributes in the HTML table based on changes that I've observed when manually clicking on a cell, but these changes have no effect on the view of the table (the row should be highlighted when a cell within it is clicked) and still don't allow me to click the submit button, which requires a row to be selected:
currScenario = mainTable.getElementsByName("acq_scenario.acq_scenario_summary").Item(0).getElementsByTagName("tr").Item(1).getElementsByTagName("td").Item(2).realValue 'gets string value for "Current Scenario" field, which I've unsuccessfully tried to use to manually update the "selected" attribute in the table
mainTable.getElementsByName("acq_scenario.acq_scenario_summary").Item(0).setAttribute "selected", "ScenarioName=" & currScenario
mainTable.getElementsByName("acq_scenario.acq_scenario_summary").Item(0).getElementsByTagName("tr").Item(0).setAttribute "class", "Skin_Selection_Color"
mainTable.getElementsByName("acq_scenario.acq_scenario_summary").Item(0).getElementsByTagName("tr").Item(0).style.setAttribute "highlight", "true"
I am a little fuzzy on what you need, but I think that using css for the row highlight and a onClick for the cell selection..
"the row should be highlighted when a cell within it is clicked"
CSS:
#msg_table tr:hover{background-color:white; }
Javascript:
/* create HTML table in Javascript */
for (var j = 0; j < search_results_length; j++){
// get zebra striping
if (j % 2 == 0){
//even
zebra = "zebra_0";
}else{
//odd
zebra = "zebra_1";
}
...
myTable+="<tr class='" + zebra + "' onClick='collapse_section_switch(" + j + ")'>"
/* row click here */
myTable+="<td align='right' onClick='balance_stuff(\"search_results[j].customer_number\")'>" + search_results[j].customer_balance + "</td>"
/* cell click here */
...
}
Does this help at all?
I still don't understand why the .click() command wouldn't click on the cell, but it turns out the answer was to use .FireEvent("onmouseup").

How to display correct page number in body of ssrs(In every page of the output)

i Placed this code in my report property code
Public Function PageNumber() as String
Dim str as String
str = Me.Report.Globals!PageNumber.ToString()
Return str
End Function
and called in my text box in body of report Like this
=Code.PageNumber()
It was not able to repeat textbox on each page.
It is showing the page number as 1 only on first page.
need to show pagenumber in each page of the output in body of the report
Kindly help me on this if u have any solution.
First Follow the steps 1 below to do pagination:
1)
1.1. Click the Details group in the Row Groups pane.
1.2. From the Tablix member Properties pane, expand “Group”-> “PageBreak”.
1.3. Set the “BreakLocation” to “End” and set the “Disable” property to the expression like below:
=IIF(rownumber(nothing) mod 40=0,false,true)
The above point 1 is use to do pagination in Report output(Display only 40 records per page in output)
2) use custom code:
Public Function PageNumberno(val as integer) as String
Dim str as String
str =(val/40)
Return str
End Function
3) Create Calculated column in Dataset and enter =0 in expression
4) In 2 Calculated Column
1)Pageno
2)No in Dataset
In Report Body use Expression for PageNo :
=code.PageNumberno(Rownumber("DataSet1"))
use Expression for No :
=IIF(Instr(code.PageNumberno(Rownumber("DataSet1"))
,".")<>0,
(Left(code.PageNumberno(Rownumber("DataSet1")),
(Instr(code.PageNumberno(Rownumber("DataSet1")),".")-1))+1)
,code.PageNumberno(Rownumber("DataSet1"))
)
5)Right click and insert column on Right Side and in Column name add code in Text box
=ReportItems!No.Value
Note: No is calculated Field column name.
6)Under AdvancedMode
IN Row Group select Static and Set RepeatOnNewPage Properties to True
In the Above Column created under point 5 will display correct page no in every page in body of the report
I have Tried and its working Fine..Try it.
I usually put a text box in the footer of the report (which will automatically display on every page) with the following line of code in it (no report property code needed):
="Page " & CStr(Globals!PageNumber) & " of " & CStr(Globals!TotalPages)

How to use bookmark for jumping to another file with PDFLib?

I want to create a link or a bookmark in pdf that take me to the another pdf with PDFLib. For that I have used following code:
String optlist = "filename=paper_planes_catalog.pdf " +"destination={page 2 type fixed left 50 top 200 zoom 2}";
Now I have created the action for that as follow:
goto_action = p.create_action("GoToR", optlist);
But how can I apply that ?
You have to create the bookmark for that.
String optlist = "action={activate " + goto_action + "} fontstyle=bold textcolor={rgb 0 0 1}";
catalog_bookmark = p.create_bookmark("Our Paper Planes Catalog", optlist);
That will do the remaining.

How to toggle "table group detail" in SSRS?

Suppose your dataset is
Street
Housenumber
InhabitantNumber
InhabitantDataType
InhabitantDataValue
So you might have
Monkeystreet : 23 : 1 : Name : Bob Smith
Monkeystreet : 23 : 1 : DOB : 01.01.1950
Monkeystreet : 23 : 2 : Name : Sheila Smith
Monkeystreet : 23 : 2 : MaritalStatus: Married
Monkeystreet : 27 : 1 : Name : John Doe
Goatroad : 15 : 1 : Name : Sally Mither
Goatroad : 15 : 1 : DOB : 02.02.1970
Note: There can be varying amounts of data per inhabitant
Now I pivot this data
So the columns are
Street : HouseNumber : Inhabitant : InhabitantData
MonkeySt. : 23 : 1 : Name: BobSmith
DOB : 01.01.1950
: 2 : Name: SheilaSmith
MarSt: Married
: 27 : 1 : Name: John Doe
-------------------------------------------------------------
Goatroad : 15 : 1 : Name: Sally Mither
: DOB : 02.02.1970
So I have a row grouping on 'streetname' and one on 'housenumber' and the 'inhabitant data' is in a table detail group
How can I make this inhabitant data 'show' or 'hide' with a toggle?
You actually need a third grouping to make the toggle work. If you group by the InhabitantNumber and then add a toggle to that grouping you will be able to show and hide the InhabitantData.
I used a test query to create the mock data you attached to your post and actually used the report wizard to create this exact behavior. Here are the steps you can take if you have your query written to create it via the Report Wizard in BIDS:
Right-Click Reports folder
Click Add New Report -> Click Next button
Setup Data source or reuse existing shared one -> Click Next button
Paste query into Query string: text area or use Query builder -> Click Next button
Choose Tabular Report Type -> Click Next button
Put the following into the Group text area using the Group> button
Street
Housenumber
InhabitantNumber
Please Note: The order you put the columns into this box determines the hierarchy of the groupings
Put the following into the Details text area using the Details> button
InhabitantDataType
InhabitantDataValue
Click Next button
Choose Stepped and click Enable drilldown checkbox -> Click Next button
Choose the Table style you prefer -> Click Next button
Name your report -> Click Finish button
This is the easiest way to create the stair stepped / toggle per grouping report. You could create it manually but just be sure to add that third grouping (by InhabitantNumber) and enable the toggle.
-Paul