Using Visual Studio 2013, is there anyway to create dynamic reports that allow the addition of unknown columns?
I'm creating a report that will show different columns per user with a possible limit of up to 8 columns. Is there a way to set some kind of variable column as a placeholder that if not in use, hide?
Using RDLC you can't dinamically add/remove columns.
In this case I would use an 8 columns DataTable filled at runtime depending on user and 8 ReportParameter to store the column name.
If a column name is nothing then set TableColumn Hidden property to True.
Related
I am working with a spread designer in visual basic 6 and am looking to change the display index of my table. I am adding extra columns and I need to rearrange them to match another form.
I am using visual basic 6 with spread designer 6.0
I have tried the below when loading the form:
lstTheLines.Col(1).DisplayIndex = 1
lstTheLines.Columns(25).DisplayIndex = 2
does anyone know how to do this without having to delete and re-add all columns?
The best way I found so far was to add the columns in the place I want using the spread designer and create an Enum in the code for each column index. This way I can give the columns a name and use that instead when populating the data. The benefit to this is that I can now rename the columns or add new ones and I just need to change the names around in the Enum given that the column type is correct.
I have an interactive grid with 7 columns. Pertinent to this question are the columns: Fund_Title and Need_Ind. Fund_Title is type Display Only. Need_Ind is type Select List. Need_Ind also has a property setting on Read Only of Type = Value, Item = Fund_Title, Value = Reporting Only, Execute = For Each Row. The page displays appropriately. I am able to utilize the select list in Need_Ind on all rows that do not have a value of Reporting Only as the Fund_Title. Only those rows where column Fund_Title = Reporting Only have the cell Need_Ind disabled. It is actually grayed out. The problem is with the save. Any rows I have modified are being correctly saved. However, any rows with the value Reporting Only in Fund_Title are also being saved, which are the exact rows I do not want to be editable. Thanks for your help.
unfortunately I'm not an expert of Crystal Report, so I'll post here my question hoping for any help about my issue.
I want to display inside my report the result of a filter on a SQL RecordSet; this RecordSet is looked up from an a single table, of which I want to show some fields of my SQL table, while the filter I want to apply is based on a field parameter (defined static) that I'm trying to set programmatically.
Here below I attached my code where I'm applying the record selection formula, I tried also hard-coding the value instead of passing it through a dropdown selection:
ReportDocument RPT_Doc = new ReportDocument();
RPT_Doc.Load(RPT_Path_Name, OpenReportMethod.OpenReportByDefault);
ApplyConnInfos(ref RPT_Doc);
RPT_Doc.SetParameterValue("data_riferimento", "20161001");
RPT_Doc.RecordSelectionFormula = "{viaggi.data_part_pre} = '20161001'";
crystalReportViewer1.ReportSource = RPT_Doc;
In the first image attached you can find the field parameter definition, while second image is the record selection formula I defined inside my report:
The report always shows all the records of my table (more than ten thousand rows), instead of displaying a filtered RecordSet. The odd thing is Preview function from Visual Studio works like a charm; it prompts the field value, once I confirm the value the viewer displays the report with the rows filtered as I expect..
What am I missing from report/C# program configuration to make the record selection work?
Thank you in advance for any suggestion you can give me :)
Leonardo
Ok, finally we got the solution to our issue.
We found the CrystalReportViewer object used to display generated reports has 2 different properties, SelectionFormula and ViewTimeSelectionFormula; both has default value set to empty string.
Below I attached the picture of .Designer.cs file with the 2 properties valued:
We commented those 2 properties and the selection formulas and field parameters applied through code / report designer worked again.
i'm using Eclipse Birt Designer v4.4.1,
What i would like to do in the report that i'm designing is to add programmatically tables (the same table structure) in my report based on a value that i get from a database query.
Example :
if (queryValue = 1) ==> Add one table
if (queryValue = 5) ==> Add 5 tables
etc ...
Obviously i should add a loop that creates the tables.
Is there a way to do this in Birt Report Designer ?
Thanks.
the easiest way to do this, is to create 2 datasets in the report, the first generate the number of tables and binded to a table element, and the second generate the rows for each table and binded to a table element that is added inside the first table element in the report, and then using the visibility property, we could hide the irrelevant rows.
I am trying to filter data using a text field, However when I specify the available Values to the dataset and field that I am using I recieve this error.
If I remove the Available values, The report runs fine.
I am using Visual Studio Ultimate 2012, with SSRS addon.
The available values can't be populated from the same data source that they are being applied to.
Create a separate data source for your available values and make sure they can populate without user interaction - without their own parameters in other words.
Get the distinct colors list on additional data-set and set it up as default value for your color parameter.
Remember that order of parameters is also important.