Making a check box visible in a report based on a string value in a query - sql

First off, i created an Album of screen shots describing my problem Click HERE(4 images hosted on imgur.com)!
Includes a brief description of each image.
(I am new to VB, but i have some programming background)
So as the title suggests i am trying to set the visibility of a CheckBox in a REPORT, based on a string value in a query.
I am getting the RunTime error shown in the Screenshot Album. Ive been trying to google the problem all day with no luck.
I think i might be incorrectly referencing the report [Reports]![Report_rptTenure_sub], but i cant be sure.
Any input or suggestion is welcome.

It looks like it might be [Reports]![rptTenure_sub], just based on the actual name shown on the tab of the report in your screenshot.

Related

SSRS Report Builder Design Layout Issues

I can't seem to figure out why the design aspect of Report Builder/Report Designer is so messed up. Either I don't understand why it is doing this (most likely) or this is just the way it is.
Every Element I add to my report seems to not show up, align or look correct in the actual preview. If I add a line that snaps to another line which looks correct in design, looks totally incorrect in the final version. This is just one example of many, see below for images showing this behavior.
If I have a field (text box) tied to a data set and I position it in a certain area, it creates weird white space, is centered wrong or worse, when re-positioning the aforementioned line element, it seems to move other nearby elements in some erratic way. In the obfuscated example, the carrier fields are all basically stacked on top of each other, while in the preview they are spaced properly, but further down in the document if I do the same thing it ends up looking drastically different.
Is this a bug? Is this how RDL and Report Designer work? Is there some trick to element positioning? Is it relative to other elements, based off of foreground vs back ground elements? Does copying a text box to create more text boxes affect them in some way vs. creating a new element each time? I can't figure it out and do not know what to search for to find the answer to this.
This seems to be a "quirk" of how Report Designer works and I just haven't found the secret to it yet. If there is some exact positioning dialog available, I would prefer to use it instead of my mouse and these issues as I have a down-to-the-MM spec document for how this should be designed, but I cannot figure it out.
I am using Report Builder 14 for SQL Server 2016. It is a one page form (an ASN label) held within a table and all elements are within a rectangle element.
Is there an online resource or Report Designer guru who can point me in the right direction when it comes to this?
Example of the vertical line element looking incorrect in Preview/Final
Example of the vertical line element looking correct in Design View
EDIT: Like HOW does this even make sense?
SSRS renders so that the elements do not overlapp. In addition every element get enough space, vertical and horizontal. Basically you cant control this but there is a workaround.
If you put a rectangle in your report and place textboxes in that rectangle, they get rendered like you placed them. This also works in a tablix cell.
Another solution for your problem would be to display everything in one tablix cell. Your expression would be looking like this:
="Ship to: " & Fields!Adress.Value & ". Postal Code: " & Fields!PostalCode.Value
You even can add line breaks and tabs into that expression.

Sharepoint Calendar Color Coding

I have used this tutorial to color the events in the calendar based on two scenarios (internal & external): Color-Code Events on a SharePoint Calendar
The problem occured in the calendar webpart whereas I cant see all the events that are filled in the events.
Any idea to fix the webpart view..
I've used this same tutorial with much success.
You don't provide too much detail in your question, but as a starting point I would double check this first:
Make sure you have "Yes" selected under "Require that this column contains information"
Double check that any existing items in the calendar list have the "Category" column filled in - you can do this easily from the data sheet view (as they show in the tutorial) or from Excel or Access. If you had a lot of old entries it would be an easy thing to miss.
If the above doesn't help. Perhaps you can share some more detail of the setup or screen shots so we can figure out what you're missing :-)

How do I hide the + sign from the WinForms ReportViewer?

I'm a bit new to reportviewer so I have a question that could solve my doubts about it. I created a DataSet and bind the table using the DataSet and created a report and show the data using the reportviewer. Here comes the problem that I can't seems to solve it. Below were the pictures that I am showing to you guys.
Notice the + sign in the box? How to make the reportviewer that it wouldn't show the + sign and immediately shows every data that I put. I need to click several times in order to see the entire data inside the reportviewer like the picture below.
I just found the answer to that doubts. It is to unselect the 'Expand/collapse' groups check box when you were creating.

RDLC Report showing data on other page if data is more

I have a bill application in winforms using reportviewer and showing rdlc report in it, I have a main report and a subreport in it
now the problem is that when i have less than 40 items it shows the report fine, but if its more than that the data comes from next page, please see the reports and ourput
Main Report
SubReport
Normal display when 25 records
When it is 40 records pg1
Second page
any help will be appriciated
try Unchecking Keep together on one page if possible option in Page break options.
I'm using vs2010, and it looks like you're in 08? so it might be a little different but I'll give it a try (mostly because I am looking for some help as well and I know how frustrating it is using this when there's not a lot of "quality" answers out there for specific problems).
In the subreport rdlc file, make sure that the "PageBreak" property (on the table containing your columns) isn't set to "start." I would just set it to "none."
What I believe that is happening is that it's moving it to the next page because it won't fit on the first page. what you can do to try to get around that is include everything on the main report in a rectangle (in the rectangle, set pagebreak = none, and keeptogether=true [I'm not sure if you actually want keeptogether=true... if it squeezes everything onto one page by resizing it set it to false]).
Hope I helped

Masked Text Box removes preceeding zeros in date

I have a process which grabs the birthdate and from a data table and display them in a masked text box for viewing and editing
However when pushing the data into the textbox any preceding zeros get removed
For example 05/05/2005 would display as 55/20/05__
The masked Text box is set up as 00/00/0000
The line which assigns the code is:
MaskedTextBox.Text = Format(DataTable(0)("DOB"), “MM/dd/yyyy”).ToString
To date I have tried the following:
Delete and re-add the control
Copy masked textbox from another form
in the same program
Above Masked textbox grabs the same
information from the same database
table and is formatted exactly the
same and it works
Tried various different formats
including no format all with the same
result
Does anyone have any other suggestions?
I've been able to replicate the problem but currently there doesn't seem to be a solution. What you need is a binding navigator toolbar on the top of your form with your data bound masked text box with any mask (doesn't matter which one). When you run the form, initially the masked text box will accept the data just fine. However, if you click the "AddNewItem" button (the plus sign button) on your binding navigator toolbar, it will cause the masked text box to delete all preceding zeros when you try to enter a date. It seems all masks will do this. Rebuilding the form won't fix it, either. It happens every time you hit the "AddNewItem" button and then proceed to enter data into any formatted masked text box.
Now that I've found out exactly how to replicate the problem, hopefully someone more knowledgeable can come along to figure out how to circumvent this. It seems like it is a glitch within VB. Don't know if this constitutes as an actual "answer" but I have provided a clear path to finding a solution. I just don't have the know-how to get that far.
(Update: I discovered that it does this to all masks, not just "short date" masks)
I think I am going to have to put this in "Mysteries of the Unexplained " box.
At the advice of another developer I manually recreated the form, re-added all the controls and it now works fine (copy and pasting all the controls from one form to another caused the issue to come with it).
I really don't know how to even recreate the issue must be something in the forms design level code???
Anyway thanks for all the assistance from everyone.
Try converting the Datatable data to date and back:
MaskedTextBox.Text = Date.Parse(DataTable(0)("DOB")).ToString("MM/dd/yyyy")
My guess is that either the database is sending the date in a format you don't expect, you changed the control's Culture (under Behaivior properties), or that you changed the way your computer shows dates and thus changed its culture. However I try I can't replicate the problem with my culture settings.
I had the same problem with Masked a Text Box control that was added at runtime. I was just trying to add the date of the day to the control
Visual studio 2013
Dim Today As Date = Now.Date
tbox_ShipDate.Text = FormatDateTime(Today,DateFormat.ShortDate) 'Failed every time
Problem was solved by using
tbox_ShipDate.Text = Format(Today, "MM/dd/yyyy")
seemed to simple but all worked well