|
ok, look for my needed.
1. create windows/web application that can connect to a database.
2. choose type of report from procedures, or from views
3. then we choose the report type is pivot or not
4. we have 3 list first for row header, second for column header, and the last for the sql operation such as sum, count, max
5. if the report is not pivot the it will be a normal select, and we drag and drop the view fields name to the column header list and if there is an sql operation we drag a field over one of them (sum, count,....), and create the select
6. if the report is pivot we drag fields for the column header, and fields for the rows header, and fields for the operation if found and we create the pivot select.
7. after that we save this select to a report database contains report name , select query, report classification.
8. in each application we build the reports from these database in the application menu and we can view the data and print it using the shown screen which is built in the dll or api that we can create for the web and for the windows
please let me know if this is possible or not, or if there is a tool can we buy it to use and don't create our own one.
|
|
|
|
|

public string SimpleReport(string title, string head, bool disp_head, int size, string csvHeader, string sizes, ref ArrayList myReport)
{
if (myReport.Count == 0)
return "";
ArrayList lstHeader = new ArrayList(),
lstContent = new ArrayList(),
lstTableSizes = new ArrayList(),
lstMessages = new ArrayList(),
lstFilters = new ArrayList(),
lst_sub_tbl_head = new ArrayList();
lstContent.Add(myReport);
lstMessages.Add(title);
lstTableSizes.Add(size);
string[] par = csvHeader.Split(',');
if (sizes == "")
{
for (int t = 0; t < par.Length; ++t)
{
sizes += (size / par.Length).ToString() + ",";
}
sizes = sizes.TrimEnd(',');
}
for (int t = 0; t < par.Length; ++t)
lst_sub_tbl_head.Add(par[t]);
lstHeader.Add(lst_sub_tbl_head);
return CodeReport ( title, head, disp_head, ref lstHeader, ref lstContent, sizes );
}
public string SimpleReport(string title, int size, string csvHeader, string sizes, ref ArrayList myReport)
{
return SimpleReport(title, "Resultados", size, csvHeader, sizes, ref myReport);
}
public string SimpleReportAlt(string title, int size, string csvHeader, string sizes, ref ArrayList myReport)
{
return SimpleReport("", title, size, csvHeader, sizes, ref myReport);
}
public bool changeColor = false;
public string CodeReport ( string info, string head, bool disp_head, ref ArrayList lstHeader, ref ArrayList lstContents, string sizes )
{
string[] s_pw = sizes.Split(',');
int t_size = 0;
for (int t = 0; t < s_pw.Length; ++t)
t_size += Convert.ToInt32(s_pw[t]);
StringBuilder sb = new StringBuilder();
sb.Append(info + "<span style='font-size:12px'><section class='widget2'><table class='table table-hover'>");
ArrayList tmp_head_cur_categ = lstHeader[0] as ArrayList;
ArrayList tmp_content_cur_categ = lstContents[0] as ArrayList;
if (disp_head)
{
sb.Append("<thead><tr>");
for (int t = 0; t < tmp_head_cur_categ.Count; ++t)
{
string cont = tmp_head_cur_categ[t].ToString();
sb.Append("<th valign='top' align='left'><b>" + cont + "</b></th>");
}
sb.Append("</tr></thead>");
}
sb.Append("<tbody>");
for (int t = 0; t < tmp_content_cur_categ.Count; ++t)
{
ArrayList tmp_line = tmp_content_cur_categ[t] as ArrayList;
sb.Append("<tr>");
for (int g = 0; g < tmp_line.Count; ++g)
sb.Append("<td valign='top' width=\"" + s_pw[g] + "px\">" + tmp_line[g].ToString() + "</td>");
sb.Append("</tr>");
}
sb.Append("</tbody></table></section></span>");
return sb.ToString();
}
List<UserData> lst_report = new List<UserData>();
ArrayList myReport = new ArrayList();
for (int t = 0; t < lst_report.Count; ++t)
{
UserData p = lst_report[t];
ArrayList columns = new ArrayList();
columns.Add("<a href='SamplePage.aspx?cod=" + p["id"] + "'>" + p["login"] + "</a>");
columns.Add(p["name"]);
columns.Add(p["email"]);
myReport.Add(columns);
}
LitRes.Text = var_util.SimpleReport( "", 0, "Login,Full Name,Email", "100,180,120", ref myReport);
|
|
|
|
|
ok, look for my needed.
1. create windows/web application that can connect to a database.
2. choose type of report from procedures, or from views
3. then we choose the report type is pivot or not
4. we have 3 list first for row header, second for column header, and the last for the sql operation such as sum, count, max
5. if the report is not pivot the it will be a normal select, and we drag and drop the view fields name to the column header list and if there is an sql operation we drag a field over one of them (sum, count,....), and create the select
6. if the report is pivot we drag fields for the column header, and fields for the rows header, and fields for the operation if found and we create the pivot select.
7. after that we save this select to a report database contains report name , select query, report classification.
8. in each application we build the reports from these database in the application menu and we can view the data and print it using the shown screen which is built in the dll or api that we can create for the web and for the windows
please let me know if this is possible or not, or if there is a tool can we buy it to use and don't create our own one.
|
|
|
|
|
ok, thats some intense requirements - the only code I have is
for presentation only, sorry.
|
|
|
|
|
I use the DevExpress reporting system, and I find it very easy to use. For a basic GUI report builder you don't really need any code, it's all handled by the reporting framework. You can build reports dynamically in code as well with the framework.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
ok, look for my needed.
1. create windows/web application that can connect to a database.
2. choose type of report from procedures, or from views
3. then we choose the report type is pivot or not
4. we have 3 list first for row header, second for column header, and the last for the sql operation such as sum, count, max
5. if the report is not pivot the it will be a normal select, and we drag and drop the view fields name to the column header list and if there is an sql operation we drag a field over one of them (sum, count,....), and create the select
6. if the report is pivot we drag fields for the column header, and fields for the rows header, and fields for the operation if found and we create the pivot select.
7. after that we save this select to a report database contains report name , select query, report classification.
8. in each application we build the reports from these database in the application menu and we can view the data and print it using the shown screen which is built in the dll or api that we can create for the web and for the windows
please let me know if this is possible or not, or if there is a tool can we buy it to use and don't create our own one.
|
|
|
|
|
That should be possible with the DX controls. Quite a bit of code would be needed, but the framework should help with that.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Your expectations are a long way beyond a report builder, any report builder. All of them will handle to design and layout of the reports you require, deciding on the layout of the report is up to the user designing the report, not the report builder software.
Storing the query and report code into a database is up to you to build. I have done all of the above using a number of reporting tools over the years so there is nothing new about your requirements. It will require you to a lot of work managing the infrastructure.
You will not need to create your own report designer, use one of the commercially available ones.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Hi,
where can i find a GOOD Example for C# Datagrid and CRUD-Functionality, with SqlDataAdapter.
I want to Insert, Update, Delete Gridvalues with Bulk via "Update-Button"
Thanks and
Regards
Nicole
|
|
|
|
|
What database are you using ?
iirc, MySQL has a plugin to Visual Studio ?2010+ that can generate a grid based or page based CRUD program
|
|
|
|
|
|
I have a function fired by a buton to select an entire row of checkboxes of a datagrid and set them with the same value (true or false), similar to the excel filters. If all checkboxes of the row are true than if I click the button, they all become false, otherwise they all become true. But it only works when all the checkboxes are simultaneously true or false, if one of them is true, they all become false instead of true as it was supposed to, like in excel filters. This is due to the last part of the code that is commented which is not throwing the expected result. Can anyone help to see the problem cause?
public void seleciona_check()
{
for (int i = 7; i < grid_lic.ColumnCount-1 ; i++)
{
for (int j = 7; j < grid_lic.ColumnCount - 1; j++)
{
if (grid_lic.CurrentRow.Cells[j].Value.ToString() == grid_lic.CurrentRow.Cells[i].Value.ToString())
{
if (grid_lic.CurrentRow.Cells[i].Value.ToString() == "True")
{
Convert.ToBoolean(grid_lic.CurrentRow.Cells[i].Value = false);
Convert.ToBoolean(grid_lic.CurrentRow.Cells[3].Value = false);
}
else if (grid_lic.CurrentRow.Cells[i].Value.ToString() == "False")
{
Convert.ToBoolean(grid_lic.CurrentRow.Cells[i].Value = true);
Convert.ToBoolean(grid_lic.CurrentRow.Cells[3].Value = true);
}
}
}
}
modified 11-Jan-16 15:01pm.
|
|
|
|
|
Your code needs quite a bit of improments:
1. why start at 7:7 (i and j)? Why go until grid_lic.ColumnCount -1 instead of grid_lic.ColumnCount?
2. Your i and j iterate through columsn onlyl not through rows at all.
3. Why do you set that CurrentRow.Cells[3] to false or true?
4. Why the double statements (Convert.ToBoolean...)?
5. The Convert.ToBoolean seems un-needed
6. You need to first check ALL cells to see if they are all true or not, so that you'll know how to set them
7. Then, once you've done 6., you have to do a simple for..., and set each checkbox to either false or true (what you computed at step 6.)
Best,
John
-- Log Wizard - a Log Viewer that is easy and fun to use!
|
|
|
|
|
1.
John Torjo wrote: 1. why start at 7:7 (i and j)? Why go until grid_lic.ColumnCount -1 instead of grid_lic.ColumnCount? Because the checkbox columns are on the column nr. 3 and from 7 untill 19, in a 21 columns datagrid.
John Torjo wrote: 2. Your i and j iterate through columsn onlyl not through rows at all. I'm not interested in going through rows, but only through the columns of the selected row.
John Torjo wrote: 3. Why do you set that CurrentRow.Cells[3] to false or true? Because there is a checkbox column in the column nr. 3.John Torjo wrote: 4. Why the double statements (Convert.ToBoolean...)? Because being checkboxes, only booleans are read.
John Torjo wrote: 6. You need to first check ALL cells to see if they are all true or not, so that you'll know how to set them Isn't the cycle in the code doing that? What's the alternative?
|
|
|
|
|
Member 11449447 wrote: John Torjo wrote: 4. Why the double statements (Convert.ToBoolean...)? Because being checkboxes, only booleans are read.
I will address your other points at a later time. Please note that the following code
"Convert.ToBoolean(grid_lic.CurrentRow.Cells[i].Value = false);" is meaningless:
1. Convert.ToBoolean makes sense only if you want to assign the result to another value, like
x = Convert.ToBoolean(y); In your case,you don't need that.
2. And false and true are already booleans.
Best,
John
-- Log Wizard - a Log Viewer that is easy and fun to use!
|
|
|
|
|
You should be able to use a variation of this code
public void CheckGrid()
{
List<int> trueIndices = new List<int>();
for (int i = 7; i < GridItems.Count - 1; i++)
{
if (GridItems[i])
{
trueIndices.Add(i);
}
}
bool setValue = trueIndices.Count == 0 || trueIndices.Count != GridItems.Count - 8;
for (int i = 7; i < GridItems.Count - 1; i++)
{
GridItems[i] = setValue;
}
} Note that you would need to convert my GridItems calls into your grid_lic... calls but this should be incredibly trivial for you.
This space for rent
|
|
|
|
|
I replaced GridItems for grid_lic, and it throws an error in grid_lic[i], with the message no overload method fot 'this' takes one argument.
|
|
|
|
|
It would have to be to your cell level - my version was just a list of booleans. Yours would have to be something like grid_lic.CurrentRow.Cells[i] (remembering to convert this to a boolean).
This space for rent
|
|
|
|
|
Now it is working, the problem was that I didn't convert grid_lic.CurrentRow.Cells[i] to a boolean.
But my idea was to not use a list, despite this probably being the simplest way to achieve the result.
Thank you.
|
|
|
|
|
You're welcome - you could, of course, use a combination of booleans if you wanted - this was simply a quick example of how you could do this.
This space for rent
|
|
|
|
|
Hi there!
I'm just trying to use dtsearch desktop/engine on my website and I was told to use C# to program it into php or sth....
I Dont know how to do programming for dtsearch to apply to my website/host so that people can use my database search engine....
and in years to come, I'm gonna turn it into android progrm
please help me, I could give you some 25 $......I'm not rich enough
thanks a million ways to die in the west juno!
|
|
|
|
|
We don't charge for help here: if you want to pay, thn go to vWorker.com and ask there. $25 should get you a complete Android app if you don't give a damn if it works at all...
But I'd start by asking the people who wrote dtsearch (whatever that is) as they will probably have a much better idea and possibly even tutorials...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
As you were told when you posted this in QA two days ago[^], if you have questions about the code in an article, use the forum at the bottom of the article[^]. The person who wrote the code is the most likely to be able to help you.
Reposting your question in a general forum will only serve to annoy the people who answer questions here, because you're duplicating work. Particularly so when you have completely ignored the advice you were given in response to your previous post!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
So I wasn't sure whether to post this here or in the database section, but here it goes. I have a 'logbook' that I'm developing which is basically a simple message board. Where I'm drawing a blank is how to format the data coming out of the database for the printable report. The database is set up so that all the messages are stored with various headers and a parent/child structure in a single table. You can have multiple child replies to a single parent, but only 1 level deep. Where I'm drawing a blank is how to structure the data for use in the printable reports. Any help would be massively appreciated as I'm drawing a blank as to which direction to go with this.
Here's the desired report structure[^] and the current data format[^]
modified 11-Jan-16 10:53am.
|
|
|
|
|